package com.itheima.web3.dao;

import com.itheima.web3.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapping {
    @Select("select id,username,password from user")
    List<User> getUsers();
    @Select("select id,username,password from user where username=#{username} and password=#{password}")
    User login(User user);
    @Select("select id,username,password from user where username=#{username}")
    User queryUserByUsername(String username);
    @Insert("insert into user(username,password) values(#{username},#{password})")
    int addUser(User user);
}
